 <gd:isPermit roles="SYSTEM_ADMIN" info="true">
<%@ page import="cn.gudian.cms.Admin.AdminRole" %>
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
  <meta name="layout" content="main"/>
  <title><g:message code="adminRole.list" default="AdminRole List"/></title>
  <script language="javascript" src="/js/list-min.js"></script>
</head>
<body>
<div class="nav">
  <span class="menuButton"><a class="home" href="${createLinkTo(dir: '')}"><g:message code="home" default="Home"/></a></span>
<span class="menuButton"><g:link class="create" action="create"><g:message code="adminRole.new" default="New AdminRole"/></g:link></span>
</div>
<div class="body">
  <h1><g:message code="adminRole.list" default="AdminRole List"/></h1>
  <g:if test="${flash.message}">
    <div class="message"><g:message code="${flash.message}" args="${flash.args}" default="${flash.defaultMessage}"/></div>
  </g:if>
  <g:form action="deleteAll" name="listForm" method="post">
    <input type="hidden" name="qstr" id="qstr">
    <div class="list">
      <table>
        <thead>
        <tr>
         <th width="30"><g:message code="chose" default="Chose"/></th>

          <g:sortableColumn property="id" title="Id" titleKey="adminRole.id"/>

          <g:sortableColumn property="name" title="Name" titleKey="adminRole.name"/>

          <g:sortableColumn property="roles" title="Roles" titleKey="adminRole.roles"/>

        <th width="30"><g:message code="edit" default="Edit"/></th>
        </tr>
        </thead>
        <tbody>
        <g:each in="${adminRoleInstanceList}" status="i" var="adminRoleInstance">
          <tr class="${(i % 2) == 0 ? 'odd' : 'even'}">

         <td><input name="listId" type="checkbox" id="listId" value="${adminRoleInstance.id}"/></td>
            <td><g:link action="show" id="${adminRoleInstance.id}">${fieldValue(bean: adminRoleInstance, field: "id")}</g:link></td>

            <td>${fieldValue(bean: adminRoleInstance, field: "name")}</td>

            <td>${fieldValue(bean: adminRoleInstance, field: "roles")}</td>

        <td><g:link action="edit" id="${adminRoleInstance.id}"><img src="/images/skin/database_edit.png"/></g:link></td>
          </tr>
        </g:each>
        </tbody>
      </table>
    </div>
  </g:form>

    <div class="paginateButtons">
      <a href="javascript:selAll()"><g:message code="allChose" default="allChose"/></a> <a href="javascript:noSelAll()"><g:message code="cancel" default="Cancel"/></a><a href="javascript:delArc(0)">&nbsp;<g:message code="delete" default="Delete"/>&nbsp;</a>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<g:paginate total="${adminRoleInstanceTotal}"/>
    </div>

</div>
</body>
</html>
</gd:isPermit>